package zigzag.designpattern.singleton;

/*
 * ZigzagSoft.net
 * Copyright 2006-2008 Jerry Chan
 * Email : jerry.chan.cn@gmail.com
 *
 * These sources may be copied, modified and distributed only for
 * projects undertaken by Jerry Chan, or with the agreement by the author.
 * Any enhancement/changes/suggestion to the source is welcome and is to
 * keep the author informed.
*/
public class YourSingleton {
    private static YourSingleton s = null;

    private YourSingleton() {
        //...
    }

    public static synchronized YourSingleton getInstance() {
        if (s == null) {
            s = new YourSingleton();
        }
        return s;
    }
}